SlideToRestore
A composable that provides a slide-to-restore functionality.
This component is built on top of the SlideToUnlock composable and handles the logic for restoring purchases using the RevenueCat SDK. It manages the different states of the restore process (loading, success, error) and communicates them through the onRestoreStateChanged callback.
Parameters
The modifier to be applied to the component.
A callback that is invoked when the restore state changes. It provides the current RestoreState.
The colors to be used for the component. Defaults to DefaultSlideToUnlockColors.
The texts to be displayed as hints. Defaults to a restore-specific hint.
Defines the shape of the background track. Defaults to a rounded rectangle.
The size of the draggable thumb.
The fraction of the track (from 0.0f to 1.0f) that the user must slide the thumb past to trigger the restore process. Defaults to 0.85f (85%).
The external padding values to be applied to the entire component.
The internal padding values for the hint composable.
Optional callback invoked with the current slide progress fraction (0f–1f).
A callback that is invoked when the slide gesture is completed, just before the restore process begins.
The direction of the sliding gesture. Defaults to SlideOrientation.Horizontal.
A composable slot for customizing the draggable thumb. It provides the slide state, current slide fraction, colors, size, and orientation.
A composable slot for customizing the hint text or visuals inside the track. It provides the slide state, current slide fraction, hint texts, colors, paddings, and orientation.